package org.jeecg.modules.demo.ch.service.impl;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.ch.entity.ImaaT;
import org.jeecg.modules.demo.ch.mapper.ImaaTMapper;
import org.jeecg.modules.demo.ch.service.IImaaTService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author yxx
 * @since 2022-10-21
 */
@Service
@DS("slave_2")
public class ImaaTServiceImpl extends ServiceImpl<ImaaTMapper, ImaaT> implements IImaaTService {

    @Resource
    ImaaTMapper imaaTMapper;

    @Override
    public List<Map<String, Object>> selectitemNoInfo(String itemNo, Integer pageNo, Integer pageSize) {

        Integer beginRowNum = pageNo - 1 * pageSize + 1;
        Integer endRowNum = pageNo * pageSize;
        return imaaTMapper.selectitemNoInfo(itemNo, beginRowNum, endRowNum);
    }

    @Override
    public int selectitemNoInfoTotal(String itemNo) {
        return imaaTMapper.selectitemNoInfoTotal(itemNo);
    }
}
